package com.atguigu.demo01_mybatisplus;

import com.atguigu.demo01_mybatisplus.config.MinioConfig;
import io.minio.MinioClient;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
public class Demo01MybatisplusApplication {

	public static void main(String[] args) {
		SpringApplication.run(Demo01MybatisplusApplication.class, args);
	}


	@Bean
	public MinioClient minioClient() {
		return new MinioClient.Builder()
				// 9001表示minio web后台管理系统的端口， 9000 表示 api访问的端口
				.endpoint(MinioConfig.URL) //要访问minio服务端的地址+端口
				.credentials(MinioConfig.USERNAME,MinioConfig.PASSWORD) // minio的账号和密码
				.build();
	}
}
